<juci-layout-with-sidebar>
	<div ng-controller="InternetParentalControlPage">
		<h2 translate>Parental Control</h2>
		<p translate>internet.parental.control.info</p>
		<juci-config-section>
			<h2 translate>URL Blocking Function</h2>
			<juci-config-lines>
				<juci-config-line title="{{'URL Blocking'|translate}}">
					<switch ng-model="firewall.urlblock.enabled.value" class="green"></switch>
				</juci-config-line>
			</juci-config-lines>
			<firewall-urlfilter-editor ng-show="firewall.urlblock.enabled.value"/>
		</juci-config-section>
		<juci-config-section>
			<h2 translate>Internet Access Scheduling</h2>
			<table class="table">
				<thead>
					<th translate>Weekdays</th>
					<th translate>Start Time</th>
					<th translate>Stop Time</th>
					<th translate>MAC Addresses</th>
					<th></th>
					<th></th>
				</thead>
				<tbody >
					<tr ng-repeat="r in accessRules">
						<td>{{r.weekdays.value}}</td>
						<td>{{r.start_time.value}}</td>
						<td>{{r.stop_time.value}}</td>
						<td>
							<div ng-repeat="mac in r.src_mac.value">
								<div class="col-xs-2"><i class="fa fa-desktop"></i></div>
								<div class="col-xs-10" >{{mac}}</div>
							</div>
						</td>
						<td style="width: 1%">
							<button class="btn btn-default" ng-click="onEditAccessRule(r)"><i class="fa fa-pencil"></i></button>
						</td>
						<td style="width: 1%">
							<button class="btn btn-default" ng-click="onDeleteAccessRule(r)"><i class="fa fa-trash-o"></i></button>
						</td>
					</tr>
					<tr>
						<td colspan="5"></td>
						<td style="width: 1%"><button class="btn btn-default" ng-click="onAddAccessRule()"><i class="fa fa-plus"></i></button></td>
					</tr>
				</tbody>
			</table>
		</juci-config-section>
		<juci-config-apply></juci-config-apply>
		<modal title="Add / Edit MAC Filter Scheduling" ng-show="rule" on-accept="onAcceptEdit()" on-dismiss="onCancelEdit()" dismiss-label="Cancel" accept-label="Save">
			<juci-schedule-edit ng-model="rule"></juci-schedule-edit>
			<juci-config-lines>
				<juci-config-line title="MAC List">
					<firewall-maclist-edit ng-model="rule.macList"/>
				</juci-config-line>
			</juci-config-line>
			<juci-errors ng-model="errors"/>
		</modal>
	</div>
</juci-layout-with-sidebar>
